package 面向对象初级.封装.四大访问修饰符;

public class Person {
        //公共的
        public String name = "张三";
        //受保护的
        protected String gender = "男";
        //默认的
        int age = 30;
        //私有的
        private char sex = '女';

        public void a () {
            System.out.println(name);
            System.out.println(gender);
            System.out.println(age);
            System.out.println(sex);
        }
}
